public class ThreadDemo5 {
    public static void main(String[] args) {
        Thread t = new Thread(){
            @Override
            public void run() {
                // 在这里 相当于在run中直接用this
                System.out.println(Thread.currentThread().getId());
                System.out.println(this.getId());
            }
        };
        t.start();

        Thread t1 = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getId());
                //System.out.println(this.getId());//err
            }
        });
        t1.start();
    }
}
